<template>
	<div class="desc">
		<div class="head">
			<label><i class="iconfont icon-dingwei" style="font-size: 0.35rem;"></i>亮点</label>
			<label>行程</label>
			<label>费用</label>
			<label>须知</label>
		</div>
		<div class="img-list">
			<img v-for="item in data.featureImages" 
			:src="getImg(item.imgUrl)" 
			:key="item.imgId">
		</div>
		<div class="huodong" v-if="data.midBanner">
			<img :src="getImg(data.midBanner.banner)" />
		</div>
		<div class="liangdian">
			<h1>活动亮点</h1>
			<div v-html="data.features"></div>
		</div>
	</div>
</template>

<script>
export default{
	name:'Desc',
	props:['propdata'],
	data(){
		return {
			data:{}
		}
	},
	methods:{
		getImg(url){
			if(url && url !== undefined){
				let imgurl = url.substring(url.indexOf('https://')==0?8:7);
				return 'https://images.weserv.nl/?url='+imgurl;
			}
		}
	},
	watch:{
		propdata(){
			this.data = this.propdata;
		}
	}
}
</script>

<style scoped>
.desc{
	width: 100%;
	height: 100%;
}
.desc .head{
	padding: 0 1rem;
	display: flex;
	font-size: 0.3rem;
	align-items: center;
	justify-content: space-between;
	height: 1.2rem;
	background-color: white;
}
.desc .head label i{
	font-size: 0.2rem;
	margin-right: 0.1rem;
}
.desc .img-list{
	width: 100%;
	display: flex;
	flex-direction: column;
}
.desc .img-list img{
	width: 100%;
	background-color: #A7A7A7;
}
.desc .huodong{
	margin: 0.2rem 0;
}
.desc .huodong img{
	width: 100%;
}
.liangdian{
	padding-top: 0.3rem;
	background-color: white;
}
.liangdian h1{
	margin-bottom: 0.2rem;
	text-indent: 0.2rem;
	border-left: 4px solid #ffd800;
	font-size: 0.4rem;
	font-weight: bold;
}
.liangdian:deep(p){
	padding: 0 0.3rem;
	font-size: 0.32rem;
	line-height: 0.5rem;
}
</style>
